package main

import "io"

type Socket struct {
}

func (s *Socket) Write(p []byte) (n int, err error) {
	return 0, nil
}

func (s *Socket) Close() error {
	return nil
}

type Writer interface {
	Write(p []byte) (n int, err error)
}

type Closer interface {
	Close() error
}

func usingWriter(writer io.Writer) {
	writer.Write(nil)
}

func usingCloser(close io.Closer) {
	close.Close()
}

func main() {
	s := new(Socket)
	usingWriter(s)
	usingCloser(s)
}
